<?php
	// Creates a MySQL database and table


	$connect = mysql_connect("localhost", "mikebrennan", "plant") or die ("Could not connect to server");
	mysql_query("DROP DATABASE snake");
	mysql_query("CREATE DATABASE IF NOT EXISTS snake") or die(mysql_error());
	mysql_select_db("snake");
	$tableformat = "CREATE TABLE highscores (id INT AUTO_INCREMENT PRIMARY KEY, name text NOT NULL, score int NOT NULL)";

	$results = mysql_query($tableformat) or die (mysql_error());
	echo "Your table was created successfully";
	mysql_query("insert into highscores values(null, 'Scruffy Pants', 9001)") or die(mysql_error());
?>